# coding: UTF-8


def split_by_value(FP_data: list) -> dict[int, int]:
    """【函 数】按值寻找下标
    """
    min_index = 0
    max_index = -1
    i = 0
    j = -1
    while (FP_data[0][i] < 200):
        min_index += 1
        i += 1
    while (FP_data[0][j] > 800):
        max_index -= 1
        j -= 1
    return (min_index, max_index)


def get_peak(FP_data: list) -> float:
    """【函 数】寻找峰值
    """
    peak = max(FP_data)
    return peak
